home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / tile-for.1 / tile-for / tile-forth-2.1 / bin / opt < prev    next >
Encoding:
Text File  |  1991-09-14  |  623 b   |  35 lines

  1. #! /bin/sh
  2. #
  3. # NAME
  4. #    opt - stack operations
  5. # SYNOPSIS
  6. #    opt <files>
  7. # DESCRIPTION
  8. #    Find possible stack optimizations.
  9. # SEE ALSO
  10. #    grep(1)
  11. # AUTHOR
  12. #    Mikael R.K. Patel
  13. #    Computer Aided Design Laboratory (CADLAB)
  14. #    Department of Computer and Information Science
  15. #    Linkoping University
  16. #    S-581 83 LINKOPING
  17. #    SWEDEN
  18. #    Email: mip@ida.liu.se
  19. # HISTORY
  20. #     Created on:     01 March 1990
  21. #    Lasted updated:    13 August 1990
  22.  
  23. if [ "$1" = "" ]
  24. then
  25.     echo "Usage:  opt file ..."
  26. else
  27.     for file in $*
  28.     do    
  29.         echo "Stack optimizations in: $file"
  30.         egrep -n "swap drop | drop drop | rot rot | swap over | over over" $file
  31.         echo
  32.     done
  33.  
  34. fi
  35.